package cn.iot.sys.service.impl;

import cn.iot.common.dto.ResultMsg;
import cn.iot.sys.dao.SysPaycategoryDao;
import cn.iot.sys.entity.SysPaycategory;
import cn.iot.sys.service.SysPaycategoryService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class SysPaycategoryServiceImpl implements SysPaycategoryService {
    @Resource
    private SysPaycategoryDao sysPaycategoryDao;
    public Logger logger = LoggerFactory.getLogger(getClass());

    @Override
    public ResultMsg getSysPaycategoryList() {
        logger.info("SysPaycategoryServiceImpl getSysPaycategoryList start ...");
        List<SysPaycategory> sysPaycategoryList = sysPaycategoryDao.getSysPaycategoryList();
        ResultMsg msg = new ResultMsg(200,"成功",sysPaycategoryList);
        return msg;
    }

    @Override
    public ResultMsg getSysPaycListByStuId(String studentId) {
        logger.info("SysPaycategoryServiceImpl getSysPaycListByStuId studentId{}",studentId);
        List<SysPaycategory> sysPaycListByStuId = sysPaycategoryDao.getSysPaycListByStuId(studentId);
        ResultMsg msg = new ResultMsg(200,"成功",sysPaycListByStuId);
        return msg;
    }
}
